import request from '@/utils/request'

// 查询移动端图片资源列表
export function listSource(query) {
  return request({
    url: '/common/getClientImgSource',
    method: 'get',
    params: query
  })
}

// 查询移动端图片资源详细
export function getSource(id) {
  return request({
    url: '/system/source/' + id,
    method: 'get'
  })
}

// 新增移动端图片资源
export function addSource(data) {
  return request({
    url: '/common/clientImgSourceUpload',
    method: 'post',
    data: data
  })
}

export function commonFileUpload(data) {  //公共图片上传
  return request({
    url: '/common/commonFileUpload',
    method: 'post',
    data: data
  })
}

// 修改移动端图片资源
export function updateSource(data) {
  return request({
    url: '/common/clientImgSourceUpload',
    method: 'put',
    data: data
  })
}

// 删除移动端图片资源
// export function delSource(id) {
//   return request({
//     url: '/common/clientImgSourceUpload/' + id,
//     method: 'delete'
//   })
// }

// 删除移动端图片资源
export function delSource(id) {
  return request({
    url: `/common/delClientImgSource/${id}`,
    method: 'delete'
  })
}








